<template>
	<view>
		<button @click="removeLogin">切换login组件的显示隐藏</button>		
		<login v-if="flag" :title="title" @myEvent="getMsg"></login>
		<demo></demo>
		<comp></comp>
		</view>
</template>

<script>
	import login from "../../components/login.vue"
	import demo from "../../components/demo.vue"
	import comp from "../../components/comp.vue"
	export default {
		data() {
			return {
				flag: true,
				title:"hello uni"
			}
		},
		methods: {
			removeLogin() {
				this.flag = !this.flag
			},
			getMsg(res){
				console.log("子组件传递给父组件的值：：："+res)
			}

		},
		components: {
			login,
			demo,
			comp
		}
	}
</script>

<style>

</style>
